Computer-generated image systems can provide dynamic, real-time, computer graphics images to simulate the three dimensional visual field from a moving vehicle, such as an airplane or car. In computer graphics systems, a three dimensional object is typically modeled using a collection of two dimensional polygons that cover the three dimensional surface of the object. The color, texture and lighting of each pixel on each visible surface is computed based on the relative position and orientation of the object containing the pixel to the viewpoint.
For flight simulation applications, and other outdoor graphics applications, it is often important to simulate the effects of fog or haze. Fog effects are particularly important in simulating aircraft approach and landing situations. The fog effect is typically implemented by generating a visibility value, V. The visibility value has a range between zero and one. The visibility value is used to mix the object color with the fog color. For a point on an object surface, the visibility value specifies how to mix the color of the point on the object with the color of the fog to obtain the color of the point on the image according to the equation EQU color(image)=V*color(object)+(1-V)*color(fog).
Conventional methods of simulating fog effects include providing a uniform density fog which results in an exponential visibility function, and generating fog effects based on a fog density function that varies as a function of distance. Three widely known fog modes are: linear fog, exponential fog, and exponential squared fog. The fog effect increases and visibility decreases with distance, D. In a linear fog mode, a start point and an end point are defined for the fog effect. The fog effect begins at the defined starting point and increases linearly until it reaches its maximum density at the defined end point. The following is a formula for a linear fog mode: ##EQU3## Exponential fog modes begin with a barely visible fog effect and increase to the maximum density along an exponential curve. The following is the formula for the exponential fog mode: EQU V(D)=e.sup.-density*D
In the exponential squared fog mode, the fog effect increasese more quickly than in the exponential fog mode. The following is the formula for the exponential squared fog mode: EQU V(D)=e.sup.-(density*D).spsp.2
These fog modes are supported in Microsoft's Direct3D.TM. application programming interface (API) and in Silicon Graphics OpenGL API. These approaches require three different implementations of fog as a function of distance. There is therefore a need for an approach to generating a wide range of fog curves using a single fog function.